package com.zhang.admin.dao;

import com.zhang.admin.vo.QueryUserByPageParams;
import com.zhang.common.core.po.admin.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    /**
     * 根据用户名查询用户
     * @param username
     * @param delFlag
     * @return
     */
    SysUser findByUsername(@Param("username") String username , @Param("delFlag")Integer delFlag);

    /**
     * 根据用户id修改删除标志
     * @param userId
     * @return
     */
    int updateDelFlagByUserId(@Param("userId") Integer userId,@Param("delFlag")Integer delFlag);

    /**
     * 分页
     * @param querySysUserByPageParams
     * @return
     */
    List<?> querySysUserByPage(@Param("querySysUserByPageParams") QueryUserByPageParams querySysUserByPageParams);

    void insertCodeBatch(List<SysUser> list);

}